using System.ComponentModel.DataAnnotations;
using S.M.SmartMedical.Domain.Enums;

namespace S.M.SmartMedical.Domain.Entities
{
    /// <summary>
    /// 医疗检查项目实体
    /// 用于存储各种检查项目的基本信息
    /// </summary>
    public class MedicalProject : BaseEntity
    {
        /// <summary>
        /// 项目名称
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 项目描述
        /// </summary>
        [MaxLength(500)]
        public string? Description { get; set; }

        /// <summary>
        /// 项目价格（单位：元）
        /// </summary>
        [Required]
        public decimal Price { get; set; }

        /// <summary>
        /// 项目类别
        /// </summary>
        [Required]
        public ProjectCategory Category { get; set; }

        /// <summary>
        /// 所属院区ID
        /// </summary>
        [Required]
        public int HospitalAreaId { get; set; }

        /// <summary>
        /// 所属院区（导航属性）
        /// </summary>
        public virtual HospitalArea HospitalArea { get; set; } = null!;

        /// <summary>
        /// 项目编码（用于标识项目）
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// 是否启用
        /// </summary>
        [Required]
        public bool IsEnabled { get; set; } = true;

        /// <summary>
        /// 排序顺序
        /// </summary>
        [Required]
        public int SortOrder { get; set; } = 0;

        /// <summary>
        /// 项目标签（JSON格式存储）
        /// </summary>
        [MaxLength(500)]
        public string? Tags { get; set; }

        /// <summary>
        /// 预约所需时间（分钟）
        /// </summary>
        public int? EstimatedDuration { get; set; }

        /// <summary>
        /// 检查前准备说明
        /// </summary>
        [MaxLength(1000)]
        public string? PreparationInstructions { get; set; }
    }
}